Fix VNC server after HVM save/restore/migrate, when no vncpasswd specified.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 28 Aug 2007 14:58:46 +0000 (15:58 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 28 Aug 2007 14:58:46 +0000 (15:58 +0100)
The basic problem was that the "image" section of the sxp had a "None"
in it, which means that on the restore (either on the local machine or
remote machine), the vnc server in the qemu device model literally
needed the string "None" to properly connect.  This simple patch only
puts a vncpasswd entry in the image if it is *not* None in the python
code, thus avoiding the whole issue.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
tools/python/xen/xm/create.py

index f4d056608bb044ddd5a39d5e41276c01a2c2d33a..96b542ac7ff8daaf2ae45f486bcf8a007991460b 100644 (file)
@@ -725,7 +725,8 @@ def configure_hvm(config_image, vals):
     for a in args:
         if a in vals.__dict__ and vals.__dict__[a] is not None:
             config_image.append([a, vals.__dict__[a]])
-    config_image.append(['vncpasswd', vals.vncpasswd])
+    if vals.vncpasswd is not None:
+        config_image.append(['vncpasswd', vals.vncpasswd])
 
 
 def make_config(vals):